Skip to content

improve swift-syntax compatibility#5

Merged
lukaskollmer merged 3 commits intomainfrom
lukas/swift-syntax-update
Apr 10, 2026
Merged

improve swift-syntax compatibility#5
lukaskollmer merged 3 commits intomainfrom
lukas/swift-syntax-update

Conversation

@lukaskollmer
Copy link
Copy Markdown
Member

improve swift-syntax compatibility

♻️ Current situation & Problem

we currently only support a single release of swift-syntax, even though we could support a range, without issues

⚙️ Release Notes

  • relaxed swift-syntax version requirement

📚 Documentation

n/a

✅ Testing

n/a

Code of Conduct & Contributing Guidelines

By creating and submitting this pull request, you agree to follow our Code of Conduct and Contributing Guidelines:

@lukaskollmer lukaskollmer self-assigned this Apr 10, 2026
@lukaskollmer lukaskollmer added the enhancement New feature or request label Apr 10, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 10, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a0d65c56-75cf-4bd1-af98-d80adb03bea8

📥 Commits

Reviewing files that changed from the base of the PR and between b94aeaf and b619ac9.

📒 Files selected for processing (1)
  • Package.swift
🚧 Files skipped from review as they are similar to previous changes (1)
  • Package.swift

📝 Walkthrough

Walkthrough

Updated Package.swift to add supported Apple platforms and tighten the swift-syntax dependency range; removed two GitHub Actions workflows (build-and-test.yml, static-analysis.yml); added a new CI workflow (.github/workflows/ci.yml) that delegates to a reusable CI workflow.

Changes

Cohort / File(s) Summary
Package manifest
Package.swift
Added supported platforms: macCatalyst(.v17), watchOS(.v10), visionOS(.v1), tvOS(.v17) (keeps macOS(.v14), iOS(.v17)) and changed swift-syntax dependency from from: "602.0.0" to a bounded range "601.0.0"..<"604.0.0".
Removed workflows
.github/workflows/...
build-and-test.yml, static-analysis.yml
Deleted GitHub Actions workflows responsible for Xcode/package builds, Linux tests, coverage upload, SwiftLint, REUSE, and markdown link checks.
Added CI workflow
.github/workflows/ci.yml
Added CI workflow that calls a reusable workflow (StanfordBDHG/.github/.github/workflows/swift-package-ci.yml@v2) with linux_run_tests: true, secrets: inherit, repo permissions, and concurrency settings.

Sequence Diagram(s)

mermaid
sequenceDiagram
participant Dev as Developer
participant GH as GitHub Actions (Repo)
participant Reusable as Reusable Workflow Repo
participant Runner as Runner
Dev->>GH: push / pull_request / workflow_dispatch
GH->>Reusable: invoke reusable workflow (swift-package-ci.yml) with inputs (linux_run_tests: true, secrets: inherit)
Reusable->>Runner: run jobs (macOS/Linux tests, build)
Runner-->>Reusable: return logs, artifacts, status
Reusable-->>GH: return status/artifacts
GH-->>Dev: report status

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: relaxing swift-syntax version constraints from a single release to a supported range.
Description check ✅ Passed The description directly addresses the changeset by explaining the current situation, the problem being solved, and the specific change made to swift-syntax version requirements.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch lukas/swift-syntax-update

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
Package.swift (1)

23-23: Consider adding CI coverage for swift-syntax version boundaries within the new range.

The range on Line 23 is good, but verify compatibility at the lower bound (601.0.0) and a recent version like 603.x by adding a version matrix to your build-and-test workflow. Your current CI tests different platforms and build configs but does not vary swift-syntax versions, so API drift in macro code could slip through undetected.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Package.swift` at line 23, Add CI matrix entries to exercise the swift-syntax
version range declared in Package.swift (the .package(...) line referencing
"https://github.com/swiftlang/swift-syntax.git" and the "601.0.0"..<"604.0.0"
range): update the build-and-test workflow's job matrix to include at least the
lower-bound version (601.0.0) and a recent point release in the 603 series
(e.g., 603.x) as separate runs, by introducing a SWIFT_SYNTAX_VERSION (or
similar) matrix axis and using it when resolving dependencies so the pipeline
performs builds/tests against those explicit swift-syntax versions to catch API
drift in macro code.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@Package.swift`:
- Line 23: Add CI matrix entries to exercise the swift-syntax version range
declared in Package.swift (the .package(...) line referencing
"https://github.com/swiftlang/swift-syntax.git" and the "601.0.0"..<"604.0.0"
range): update the build-and-test workflow's job matrix to include at least the
lower-bound version (601.0.0) and a recent point release in the 603 series
(e.g., 603.x) as separate runs, by introducing a SWIFT_SYNTAX_VERSION (or
similar) matrix axis and using it when resolving dependencies so the pipeline
performs builds/tests against those explicit swift-syntax versions to catch API
drift in macro code.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 872f09d8-9407-473e-ab18-405239645981

📥 Commits

Reviewing files that changed from the base of the PR and between 16704d1 and 0954dde.

📒 Files selected for processing (1)
  • Package.swift

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 43.75%. Comparing base (16704d1) to head (b619ac9).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main       #5       +/-   ##
===========================================
- Coverage   71.88%   43.75%   -28.12%     
===========================================
  Files           4        4               
  Lines          32       32               
===========================================
- Hits           23       14        -9     
- Misses          9       18        +9     

see 2 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 16704d1...b619ac9. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Member

@PSchmiedmayer PSchmiedmayer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @lukaskollmer 🚀

@PSchmiedmayer
Copy link
Copy Markdown
Member

Probably also good to switch to the new CI setup here

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/ci.yml:
- Line 29: Update the reusable workflow reference that currently uses the
mutable tag in the line containing "uses:
StanfordBDHG/.github/.github/workflows/swift-package-ci.yml@v2" by replacing the
tag "@v2" with the immutable commit SHA
"@142f7f3fb05a9bcad0e90f7056f8b4bd62dbd631" so the workflow is pinned to a
specific commit for supply-chain stability.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 961dabda-3e6a-48f9-b73b-1b7c6b9bc2ac

📥 Commits

Reviewing files that changed from the base of the PR and between 0954dde and b94aeaf.

📒 Files selected for processing (3)
  • .github/workflows/build-and-test.yml
  • .github/workflows/ci.yml
  • .github/workflows/static-analysis.yml
💤 Files with no reviewable changes (2)
  • .github/workflows/static-analysis.yml
  • .github/workflows/build-and-test.yml

@lukaskollmer lukaskollmer merged commit 44d3c09 into main Apr 10, 2026
62 of 66 checks passed
@lukaskollmer lukaskollmer deleted the lukas/swift-syntax-update branch April 10, 2026 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants